﻿using System;

namespace Gonte.Validation
{
    public class FieldNotNullValidator
        : FieldValidator
    {
        /// <summary>
        /// Validates the value is not null
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public override bool Validate(Object value)
        {
            if (value == null)
            {
                error_ = "Null value";
                return false;
            }

            return true;
        }
    }
}
